#!/bin/bash
if read -t 60 -p "请输入您要合并的分支: " branch
then
  git merge $branch
  git push
  # 使用 git branch 命令
  branch_name=$(git branch | grep '*' | sed 's/* //')
  echo "当前分支名称为：$branch_name"
  git checkout $branch
  git merge $branch_name
  git pull
  git push
  git checkout $branch_name
  echo "合并完毕--$message"
else
  echo "抱歉，输入分支超时"
  exit 1
fi